<template>
    <div class="com-cnt">
        <ul v-if="list.length !== 0">
            <li v-for="lists in list">
                <div>
                    <span class="li_top_l">{{lists.streamEx}}</span>
                    <span v-show="lists.status == 1" class="li_top_r">进行中</span>
                    <span v-show="lists.status == 0" class="li_top_r">已完成</span>
                </div>
                <div>
                    <span class="li_bot_l">{{lists.strOT}}</span>
                    <span class="li_bot_r">
                        <span class="Symbol">{{lists.sourceType == 1?"+":"-"}}</span>
                        <span class="num">{{lists.turnover}}</span>
                    </span>
                </div>
            </li>
        </ul>
        <div v-else :style="emptyimg" style="width:100%;height:100%">

        </div>
    </div>
</template>

<script>
import http from "@/assets/js/axios"
import { domain } from '@/assets/js/config'
import $ from 'jquery'
import { maskTips } from '@/assets/js/dom'
export default {
    data() {
        return {
            list: [],
            emptyimg: {
                backgroundImage: "url(" + require("@/assets/imgs/manage/yeempty.png") + ")",
                backgroundRepeat: "no-repeat",
                backgroundSize: "100%",
                marginTop: "5px"
                }
        }
    },
    components: {

    },
    mounted() {
        // this.getIntegrals();
        // 调用getReason方法
        this.getReason();
    },
    methods: {
        direct: function (val) {
            this.$router.push({ path: '/' + val });
        },
        // 余额明细
        getReason: async function () {
            let that = this
            let userInfo = JSON.parse(sessionStorage.getItem('UserInfo'));
            let userToken = localStorage.getItem("token") || ''
            let postDo = {
                assets_type: '1'
            };
            const res = await http.post('xshk/f/assetsStream/query?token=' + userToken, postDo)
            if (res.data.code == -5) {
                maskTips({ id: "bal-fail", txt: res.data.message })
                that.$router.push('/login')
                return false;
            }
            if (res.status == 200) {
                if(res.data.data){
                    this.list = res.data.data;
                }else{
                    this.list = []
                }
                
            }
        }
    }
}
</script>

<style scoped>
.com-cnt{
    width: 100%;
    height: 80%
}
    
ul {
    width: 100%;
    border-top: 1px solid #f2f2f2;
    /* margin-top: 0.92rem; */
}
ul li {
    padding: 0.18rem 0.4rem;
    box-sizing: border-box;
    width: 100%;
    height: 1.22rem;
    color: #9f9f9f;
    border-bottom: 1px solid #f2f2f2;
    position: relative;
}
ul li div {
    width: 100%;
    height: 50%;
    overflow: hidden;
}
ul li div .li_top_l {
    color: #383838;
    font-size: 0.32rem;
    font-weight: 900;
    float: left;
    font-family: "PingFang-SC-Heavy";
}
ul li div .li_top_r {
    font-size: 0.27rem;
    font-weight: 600;
    float: right;
    color: #333;
    font-family: "PingFang-SC-Medium";
}
ul li div .li_bot_l {
    font-size: 0.28rem;
    font-weight: 500;
    float: left;
    font-family: "PingFang-SC-Regular";
}
ul li div .li_bot_r {
    font-size: 0.28rem;
    font-weight: 500;
    float: right;
    font-family: "PingFang-SC-Medium";
}
</style>
